import 'package:flutter/material.dart';
import 'package:my_enjoy/pages/home/components/home_list.dart';
import 'package:my_enjoy/pages/home/components/home_nav.dart';

class HomePage extends StatefulWidget {
  const HomePage({super.key});

  @override
  State<HomePage> createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: const Color.fromARGB(40, 85, 145, 175),
      appBar: AppBar(
        title: const Text('享+社区'),
        centerTitle: true,
        backgroundColor: Colors.transparent,
      ),
      body: ListView(
        padding: const EdgeInsets.all(10),
        children: [
          HomeNav(), // 中间广告图
          ClipRRect(
            borderRadius: BorderRadius.circular(10.0),
            child: Image.asset('assets/images/banner@2x.jpg'),
          ),
          HomeList(),
        ],
      ),
    );
  }
}
